home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Graphics / Plotting / Lyapunov / Source / InfoController.m < prev    next >
Text File  |  1995-06-12  |  3KB  |  117 lines

  1.  
  2. /* Generated by Interface Builder */
  3.  
  4. #import "InfoController.h"
  5. #import <appkit/Window.h>
  6. #import <appkit/Application.h>
  7.  
  8. @implementation InfoController
  9.  
  10. + new                // make sure that *Panel is nil.
  11. {
  12.   self = [super new];
  13.   infoPanel=nil;
  14.   helpPanel=nil;
  15.   licensePanel=nil;
  16.   preferencesPanel=nil;
  17.   return self;
  18. }
  19.  
  20. - setInfoPanel:anObject        // set the infoPanel.
  21. {
  22.     infoPanel = anObject;
  23.     return self;
  24. }
  25.  
  26. - setHelpPanel:anObject        // set the helpPanel.
  27. {
  28.     helpPanel = anObject;
  29.     return self;
  30. }
  31.  
  32. - setLicensePanel:anObject    // set the licensePanel.
  33. {
  34.     licensePanel = anObject;
  35.     return self;
  36. }
  37.  
  38. - setPreferencesPanel:anObject    // set the preferencesPanel.
  39. {
  40.     preferencesPanel = anObject;
  41.     return self;
  42. }
  43.  
  44. - infoPanel        // return the infoPanel, load it if needed.
  45. {
  46.   if( !infoPanel)
  47.     [NXApp loadNibSection:"InfoPanel.nib" owner:self withNames:NO];
  48.   return infoPanel;
  49. }
  50.  
  51. - helpPanel        // return the helpPanel, load it if needed.
  52. {
  53.   if( !helpPanel)
  54.     [NXApp loadNibSection:"HelpPanel.nib" owner:self withNames:NO];
  55.   return helpPanel;
  56. }
  57.  
  58. - licensePanel        // return the licensePanel, load it if needed.
  59. {
  60.   if( !licensePanel)
  61.     [NXApp loadNibSection:"LicensePanel.nib" owner:self withNames:NO];
  62.   return licensePanel;
  63. }
  64.  
  65. - preferencesPanel    // return the preferencesPanel, load it if needed.
  66. {
  67.   if( !preferencesPanel)
  68.     [NXApp loadNibSection:"PreferencesPanel.nib" owner:self withNames:NO];
  69.   return preferencesPanel;
  70. }
  71.  
  72. - info:sender        // make the info panel be up there.
  73. {
  74.   [[self infoPanel] makeKeyAndOrderFront:sender];
  75.   return self;
  76. }
  77.  
  78. - help:sender        // make the help panel be up there.
  79. {
  80.   [[self helpPanel] makeKeyAndOrderFront:sender];
  81.   return self;
  82. }
  83.  
  84. - license:sender    // make the license panel be up there.
  85. {
  86.   [[self licensePanel] makeKeyAndOrderFront:sender];
  87.   return self;
  88. }
  89.  
  90. - preferences:sender    // make the preferences panel be up there.
  91. {
  92.   [[self preferencesPanel] makeKeyAndOrderFront:sender];
  93.   return self;
  94. }
  95.  
  96. // Are these useful?  I think not.  Not expensive, though.
  97. - write:(NXTypedStream *)stream
  98. {
  99.     [super write:stream];
  100.     NXWriteObjectReference( stream, infoPanel);
  101.     NXWriteObjectReference( stream, helpPanel);
  102.     NXWriteObjectReference( stream, licensePanel);
  103.     NXWriteObjectReference( stream, preferencesPanel);
  104.     return self;
  105. }
  106. - read:(NXTypedStream *)stream
  107. {
  108.     [super read:stream];
  109.     infoPanel=NXReadObject( stream);
  110.     helpPanel=NXReadObject( stream);
  111.     licensePanel=NXReadObject( stream);
  112.     preferencesPanel=NXReadObject( stream);
  113.     return self;
  114. }
  115.  
  116. @end
  117.